Skip to content

Read complete calendar recording windows - #332

Merged
robzolkos merged 4 commits into
mainfrom
fix-calendar-recordings-pagination
Aug 25, 2026
Merged

Read complete calendar recording windows#332
robzolkos merged 4 commits into
mainfrom
fix-calendar-recordings-pagination

Conversation

@robzolkos

@robzolkos robzolkos commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

mise ~/.config/mise/config.toml tools: gh@2.98.0
mise ~/.config/mise/config.toml tools: gh@2.98.0
mise ~/.config/mise/config.toml tools: gh@2.98.0
Calendar recording lists stopped after HEY's first geared-pagination page. Because HEY orders recordings by start time, older recurring-series masters could disappear from hey event list even while they recur inside the requested window.

Bug

hey event list, including --ids-only, read one /calendars/:id/recordings.json response and discarded its Link cursor. A full first page of newer one-off recordings hid recurring series that began earlier. The same incomplete shared reader backed to-do and journal lists and event lookup for editing.

The expected behavior is for a requested recording window to include every recording HEY serves across its pages.

Fix

  • Follow each calendar's opaque page cursor until HEY returns the last or an empty page.
  • Refuse a repeated cursor instead of looping indefinitely.
  • Preserve calendar order and each page's server order.
  • Document that event lists are ordered by start time, not creation time, and recommend using the ID returned by hey event add for follow-up writes.

The TUI is unchanged; it reads calendar day, week, and year endpoints rather than this CLI recording-window helper.

Proof

The regression test serves a one-off event on page one and an older recurring-series master on page two, then verifies event list --ids-only returns both IDs and follows HEY's opaque cursor.

GOWORK=off go test ./internal/cmd -run 'TestEventsList(FollowsEveryRecordingsPage|StopsOnAnEmptyRecordingsPage|RefusesARepeatedRecordingsCursor|ReadsEveryCalendar|CountsAndListsIDs)$'
# PASS

GOWORK=off make test
# PASS, including the TUI suite

GOWORK=off make lint
# 0 issues

GOWORK=off make build
# PASS

Dependency and risk

Uses the released github.com/basecamp/hey-sdk/go v0.25.0 from merged basecamp/hey-sdk#125. The corresponding Nix dependency hash is refreshed for that module version.

Risk is low to medium: returned data is now complete, but accounts with large recording windows may make additional API requests. No live-server smoke test was run. The original report was supplied out-of-band, so there is no durable issue link.

Reviewer focus: cursor termination in recordingWindow.readCalendar and the shared effect on event, to-do, and journal CLI listings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Completes CLI calendar recording-window reads by following HEY pagination, fixing missing older recurring series.

Changes:

  • Follows opaque cursors with empty-page and cycle termination.
  • Adds pagination regression coverage and event-ordering guidance.
  • Pins the SDK commit providing GetRecordingsPage.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
README.md Documents complete pagination and ordering.
internal/cmd/recording_filter.go Implements paginated recording reads.
internal/cmd/calendar_commands_test.go Tests successful multi-page event listing.
go.mod Pins the pagination-capable SDK commit.
go.sum Updates SDK checksums.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/cmd/recording_filter.go
@robzolkos
robzolkos merged commit df6c1bb into main Aug 25, 2026
33 checks passed
@robzolkos
robzolkos deleted the fix-calendar-recordings-pagination branch August 25, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants